import { meta } from 'eslint-plugin-vue'
import { createRouter, createWebHistory } from 'vue-router'

export const erji = [
  {
    path: '/home',
    name: 'home',
    meta: {
      title: '首页'
    },
    component: () => import('../views/home/index.vue'),
  },
  {
    path: '/list',
    name: 'list',
    meta: {
      title: '更多'
    },
    component: () => import('../views/home/index.vue'),
    children: [
      {
        path: '/list/dt',
        name: '地图',
        component: () => import('../views/dt/index.vue'),
      },
      {
        path: '/list/gd',
        name: '更多',
        component: () => import('../views/gd/index.vue'),
      }
    ]
  },
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [

    {
      path: '/login',
      name: 'login',
      component: () => import('../views/login/index.vue'),
    },
    {
      path: '/layout',
      name: 'layout',
      component: () => import('../views/layout/index.vue'),
    },
    {
      path: '/403',
      name: '403',
      component: () => import('../views/403/index.vue'),
    },
    {
      path: '/404',
      name: '404',
      component: () => import('../views/404/index.vue'),
    },
  ],
})

export default router
